package file.day9_24.day08;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection c = new HashSet();
        c.add("java");
        c.add("c");
        c.add("c++");
        c.add("c");
        System.out.println("c"+c);

        Collection c1 = new ArrayList();
        c1.add("android");
        c1.add("ios");
        c1.add("java");
        System.out.println("c1" + c1);

        boolean tf = c.addAll(c1);//由于c是HashSet实例化，所以会去重；
        System.out.println(tf);
        System.out.println("c" + c);
        System.out.println("c1" + c1);


    }
}
